<include file="application/walletyhbbadmin/view/public/left.html"/>
   
 <div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">管理中心<b>></b><strong>折扣标准管理</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
     <h3><a href="{:U('Discount/Discount')}" class="actionBtn add">添加折扣标准</a>折扣标准管理</h3>
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
    <tr align="center">
        <th>ID</th>
        <th>折扣标题</th>
        <th>标准</th>
        <!-- <th>小于</th> -->
        <th>享受优惠</th>
        <th>是否使用</th>
        <th>操作</th>
    </tr>
    <volist name='list' id='vo'>
    <tr align="center">
        <td>{$vo.id}</td>
        <!-- <td><img src="{$vo.logo}" width="30px"></td> -->
        <td>{$vo.name}</td>
        <td>消费满{$vo.money}元</td>
        <td>减{$vo.expression}%</td>

        <td>
            <eq name="vo.is_close" value="1">使用
                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Discount/updateStatus',array('id'=>$vo.id,'is_close'=>'0'))}" style="color:#fff">关闭</a>&nbsp;</span>
            </eq>
            <eq name="vo.is_close" value="0">关闭
                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Discount/updateStatus',array('id'=>$vo.id,'is_close'=>'1'))}" style="color:#fff">使用</a>&nbsp;</span>
            </eq>
        </td>
        <td><a href="/walletyhbbadmin/Discount/delDiscount/id/{$vo.id}" class="del" did="{$vo.id}">删除</a>&nbsp;&nbsp;<a href="/walletyhbbadmin/Discount/upDiscount/id/{$vo.id}">修改</a></td>
        </tr>
    </volist>
    </table>

    <div>{$page}</div>
</div>
</div>
<div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
</body>
<script type="text/javascript">
    // alert($);
    $('.del').click(function(){
        var id=$(this).attr('did');
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true) {
            $.post('/walletyhbbadmin/Discount/delDiscount', {'id': id}, function (data) {
                layer.msg(data.info);
                if (data.status > 0) {
                    setTimeout(function () {
                        window.location.reload();
                        isclick4 = true;
                    }, 1000);
                }
            });
        }
    });
</script>
</html>